home *** CD-ROM | disk | FTP | other *** search
/ PC Answers 1995 May / PC Answers CD-ROM 7 (Future Publishing) (May 1995).iso / vbits / code / cert / trk3_eg / refresh / frmqrefr.frm (.txt) next >
Encoding:
Visual Basic Form  |  1994-11-29  |  2.6 KB  |  101 lines

  1. VERSION 2.00
  2. Begin Form frmQRefresh 
  3.    Caption         =   "Refresh Examples"
  4.    ClientHeight    =   4020
  5.    ClientLeft      =   1575
  6.    ClientTop       =   1560
  7.    ClientWidth     =   4755
  8.    Height          =   4425
  9.    Left            =   1515
  10.    LinkTopic       =   "Form1"
  11.    ScaleHeight     =   4020
  12.    ScaleWidth      =   4755
  13.    Top             =   1215
  14.    Width           =   4875
  15.    Begin CommandButton cmdQRefresh 
  16.       Caption         =   "Choice &B"
  17.       Height          =   495
  18.       Index           =   1
  19.       Left            =   1560
  20.       TabIndex        =   1
  21.       Top             =   1200
  22.       Width           =   1215
  23.    End
  24.    Begin CommandButton cmdQRefresh 
  25.       Caption         =   "Choice &D"
  26.       Height          =   495
  27.       Index           =   3
  28.       Left            =   1560
  29.       TabIndex        =   3
  30.       Top             =   2400
  31.       Width           =   1215
  32.    End
  33.    Begin CommandButton cmdQRefresh 
  34.       Caption         =   "Choice &C"
  35.       Height          =   495
  36.       Index           =   2
  37.       Left            =   1560
  38.       TabIndex        =   2
  39.       Top             =   1800
  40.       Width           =   1215
  41.    End
  42.    Begin CommandButton cmdQRefresh 
  43.       Caption         =   "Choice &A"
  44.       Height          =   495
  45.       Index           =   0
  46.       Left            =   1560
  47.       TabIndex        =   0
  48.       Top             =   600
  49.       Width           =   1215
  50.    End
  51.    Begin Label Label1 
  52.       Caption         =   "Pick a Choice.  Then resize the form.  This will test the refresh method."
  53.       Height          =   375
  54.       Left            =   240
  55.       TabIndex        =   5
  56.       Top             =   120
  57.       Width           =   4215
  58.    End
  59.    Begin Label lblChoise 
  60.       Caption         =   "Choice"
  61.       Height          =   255
  62.       Left            =   1560
  63.       TabIndex        =   4
  64.       Top             =   3240
  65.       Width           =   1335
  66.    End
  67. Option Explicit
  68. Dim choice As String
  69. Sub CmdQRefresh_Click (index As Integer)
  70. Select Case index
  71. Case 0  'choice A
  72.     choice = "A"
  73.     lblChoise = "Choice A"
  74. Case 1  'choice B
  75.     choice = "B"
  76.     lblChoise = "Choice B"
  77. Case 2  'choice C
  78.     choice = "C"
  79.     lblChoise = "Choice C"
  80. Case 3  'choice D
  81.     choice = "D"
  82.     lblChoise = "Choice D"
  83. End Select
  84. End Sub
  85. Sub Form_Paint ()
  86. Select Case choice
  87. Case "A"
  88.     Me.Refresh
  89.     Me.AutoRedraw = True
  90. Case "B"
  91.     Me.AutoRedraw = True
  92.     Me.Refresh
  93. Case "C"
  94.     Me.Refresh
  95.     Me.AutoRedraw = False
  96. Case "D"
  97.     Me.AutoRedraw = False
  98.     Me.Refresh
  99. End Select
  100. End Sub
  101.